Apparatus and method for error concealment

ABSTRACT

The present invention provides an apparatus and a method for error concealment. The control core receives an input signal and identifies an error macro-block in a column of slice of a frame and a frame type of the frame. The parameter computation module receives a plurality of DCT coefficients and temporal data to derive at least a coefficient for the weighting in an adaptive computation for the frame. The temporal compensation module computes the temporal data to obtain a result of the temporal compensation. The spatial processing module computes spatial data to obtain a result of the spatial processing. The adaptive processing module proceeds the adaptive computation with the coefficient for the weighting derived by the parameter computation module, the result of the temporal compensation and the result of the spatial processing, and generates a result of the adaptive processing. The spatial processing may be a bilinear interpolation or a spatial interpolation.

FIELD OF THE INVENTION

The present invention relates to an apparatus and method for errorconcealment, and more particularly, to an apparatus and method for errorconcealment for video transmission.

BACKGROUND OF THE INVENTION

Recently, the compressed video delivery over the error-prone environmentis growing rapidly. For example, MPEG-2 and H. 263 coding systems havebeen widely applied in digital TVs, video-on-demands, video-conferencingand multimedia communications. However, the coded video is verysensitive to channel errors due to variable length coding (VLC). Sincethe receiver needs to decode the VLC codeword sequentially,non-correctable VLC codes often lead to errors of subsequent data. Thedecoding error is not only in the current block but also in the nextblocks until the next re-synchronization point. The minimumsynchronization point is often set to be a GOB (Group of Macro-blocks)for H. 263 system or a Slice for MPEG-2. The bit-stream errors may leadto information loss in partial or entire Slice (or GOB) and cause thesudden degrading of the image quality. Moreover, the errors would bepropagated into the entire GOP (Group of Pictures) coding due to motioncompensation.

SUMMARY OF THE INVENTION

Hence, an objective of the present invention is to provide an apparatusand method for error concealment which adaptively combines the resultsof the spatial processing and the temporal compensation based on blockvariance and inter-frame correlation to correct the error data.

Another objective of the present invention is to provide an apparatusand method for error concealment in which the adaptive function dependson the scene change detection, motion distance and spatial informationfrom the nearby blocks of the previous and current frames to determinethe weighting of the spatial processing and the temporal compensation.

According to the aforementioned objectives, the present inventionprovides an apparatus for error concealment. The apparatus comprises acontrol core, a parameter computation module, a temporal compensationmodule, a spatial processing module, and an adaptive processing module.The control core receives an input signal and identifies an errormacro-block in a column of slice of a frame and a frame type of theframe. The parameter computation module receives a plurality of DCTcoefficients and temporal data to derive at least a coefficient for theweighting in an adaptive computation for the frame. The temporalcompensation module computes the temporal data to obtain a result of thetemporal compensation. The spatial processing module computes spatialdata to obtain a result of the spatial processing. The adaptiveprocessing module proceeds the adaptive computation with the coefficientfor the weighting derived by the parameter computation module, theresult of the temporal compensation and the result of the spatialprocessing, and generates a result of the adaptive processing.

In the preferred embodiment of the present invention, the apparatusfurther comprises a multiplexer for outputting a normal pixel, or theresult of the temporal compensation, the result of the spatialprocessing, or the result of the adaptive processing as a correctedpixel in the error macro-block. The apparatus further comprises at leasta buffer to store the spatial data and at least a register to store thetemporal data.

The present invention provides a method for error concealment. Themethod comprises the following steps. First, an input signal is receivedand an error macro-block in a column of slice of a frame and a frametype of the frame are identified. Then, a plurality of DCT coefficientsis extracted from a decoder and temporal data is accessed to derive atleast a coefficient for the weighting in an adaptive computation for theframe. The temporal data is computed to obtain a result of the temporalcompensation, and spatial data is computed to obtain a result of thespatial processing. Afterwards, the adaptive computation is proceededwith the coefficient for the weighting, the result of the temporalcompensation and the result of the spatial processing, and a result ofthe adaptive processing is generated.

In the preferred embodiment of the present invention, the method furthercomprises outputting a normal pixel, or the result of the temporalcompensation, the result of the spatial processing, or the result of theadaptive processing as a corrected pixel in the error macro-block. Themethod further comprises inputting a plurality of macro-blocks of a nextcolumn of slice when the error macro-block is computed.

BRIEF DESCRIPTION OF THE DRAWINGS

The foregoing aspects and many of the attendant advantages of thisinvention will be more readily appreciated as the same becomes betterunderstood by reference to the following detailed description, whentaken in conjunction with the accompanying drawings, wherein:

FIG. 1 illustrates the boundary search to find the best match betweenthe bottom block B_(B) and the top blocks B_(TL), B_(T) and B_(TR);

FIG. 2 a and FIG. 2 b illustrates the error concealment with weightinginterpolation from the best match boundary with top-to-bottom blocksearching and bottom-to-top block searching, respectively;

FIG. 3 illustrates the processing flow of the full system;

FIG. 4 illustrates the relative motion prediction for error concealment;

FIG. 5 illustrates the frequency distribution in a DCT block;

FIG. 6 illustrates the apparatus for error concealment of the preferredembodiment of the present invention;

FIG. 7 illustrates the computation schedule of the spatial processing;

FIG. 8 illustrates the implementation of the present invention in anerror concealment chip; and

FIG. 9 illustrates the test structure of the preferred embodiment of thepresent invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

In order to make the illustration of the present invention more explicitand complete, the following description is stated with reference to theaccompanying drawings.

The present invention provides an apparatus and a method for errorconcealment. The control core receives an input signal and identifies anerror macro-block in a column of slice of a frame and a frame type ofthe frame. The parameter computation module receives a plurality of DCTcoefficients and temporal data to derive at least a coefficient for theweighting in an adaptive computation for the frame. The temporalcompensation module computes the temporal data to obtain a result of thetemporal compensation. The spatial processing module computes spatialdata to obtain a result of the spatial processing. The adaptiveprocessing module proceeds the adaptive computation with the coefficientfor the weighting derived by the parameter computation module, theresult of the temporal compensation and the result of the spatialprocessing, and generates a result of the adaptive processing. Thespatial processing may be a bilinear interpolation or a spatialinterpolation.

The following will detaily describe the spatial interpolation and thetemporal compensation disclosed in the present invention.

A spatial interpolation technique is provided to recover the damagessuffered by continuous blocks. First, 1-D block boundary matching isemployed between the neighboring blocks to find the edge direction for alost block. Then, the recovered pixel is interpolated along the edgedirection based on the estimated result. FIG. 1 illustrates the boundarysearch to find the best match between the bottom block B_(B) and the topblocks B_(TL), B_(T) and B_(TR), where B_(TL), B_(T) and B_(TR) denotethe top-left, the top, and the top-right blocks. The 1-D boundarymatches with the mean absolute difference (MAD) as expressed by equation(1): $\begin{matrix}{{{{MAD}({Mx})} = {\sum\limits_{i = 0}^{N - 1}\quad{{f_{0,i}^{B_{B}} - f_{{N - 1},{i + {Mx}}}^{B_{TL},B_{T},B_{TR}}}}}},} & (1)\end{matrix}$where Mx is a search vector that is from −N to N if the block size isN×N. Then, the best match (BMA) corresponding to the minimum MAD valuecan be obtained asBMA=Min. (MAD(Mx)), Mx from −N to N.  (2)

After comparing 2N MADs, the best vector can be found that matches theblock B_(B) and the blocks B_(TL), B_(T) and B_(TR) in boundary. Thebest vector can give direction to the edge for the lost block. If theedge direction is 0°˜45°, the best match should be located between theblocks B_(T) and B_(TR). On the other hand, if the edge direction is90°˜135°, the best match could be found between the blocks B_(TL) andB_(T).

If the estimated result BMA value is less than one threshold, thisimplies that there exists a significant edge or a smooth area betweenthe neighboring blocks. In this case, the lost pixels are interpolatedalong the direction of the best vector. FIG. 2 a shows the interpolationdirection as the vector Mx=−6. If one direction line contains M pixelsto be interpolated, this can be computed using $\begin{matrix}{{\hat{f}}_{{m1},{n1}}^{1} = {{f_{{N - 1},i}^{B_{TL},B_{T},B_{TR}} \times \frac{d2}{M}} + {f_{0,k}^{B_{B}} \times \frac{d1}{M}}}} & (3)\end{matrix}$where d1 and d2 are the distances between the interpolated pixel to thebest matching boundary and to the bottom block, respectively. If thelocation of the interpolated pixel is closer to the bottom block, theweighting of the boundary pixel of block B_(B) is increased since d1becomes larger. N lines are needed to interpolate for a lost block alongthe best matching boundary to recover some significant edges.

Then, the top block B_(T) is used to find the best vector among thebottom blocks B_(BL), B_(B) and B_(BR) with the boundary matching, whereB_(BL), B_(B) and B_(BR) denote the bottom-left, the bottom, and thebottom-right blocks. By the same procedure above, the best vector can befound after 2N MAD computations. Then, the pixel is interpolated alongthe best matching boundary as $\begin{matrix}{{\hat{f}}_{{m2},{n2}}^{2} = {{f_{0,i}^{B_{BL},B_{B},B_{BR}} \times \frac{d1}{M}} + {f_{{N - 1},k}^{B_{T}} \times {\frac{d2}{M}.}}}} & (4)\end{matrix}$The interpolation direction is shown in FIG. 2 b.

Then, the lost pixel is recovered from the merging of the results of (3)and (4). If the interpolated pixel is overlapped, the results of (3) and(4) are averaged using $\begin{matrix}{{{{{{If}\quad f_{{m1},{n1}}^{1}} \neq {0\quad{and}\quad f_{{m2},{n2}}^{2}}} = 0},{{\hat{f}}_{m,n} = f_{{m1},{n1}}^{1}}}{{{{Elseif}\quad f_{{m1},{n1}}^{1}} = {{0\quad{and}\quad f_{{m2},{n2}}^{2}} \neq 0}},{{\hat{f}}_{m,n} = f_{{m2},{n2}}^{2}}}{{{{Elseif}\quad f_{{m1},{n1}}^{1}} \neq {0\quad{and}\quad f_{{m2},{n2}}^{2}} \neq 0},{{\hat{f}}_{m,n} = \frac{f_{{m1},{n1}}^{1} + f_{{m2},{n2}}^{2}}{2}}}} & (5)\end{matrix}$where the error pixel level is set to zero. Since the neighboring blockshave high correlation about the edge information, most of the lostpixels can be efficiently recovered along the edge direction with theproposed matching or interpolating scheme. However, a few pixels are notinterpolated after the two-direction interpolations. The non-linearmedian filter is used to interpolate the residual un-recovered pixels toavoid blurring the images. To improve performance, overlapping blockprocessing can be employed rather than the median filter. Theoverlapping scheme takes the match and interpolations like the abovementioned method between two block-boundaries.

For the temporal compensation, the purpose is to find an accuracy motionvector from the available neighboring blocks of the current andreference frames rather than motion estimation in the decoder. As thetrue motion vector is (Mvx, Mvy) and the recovered vector at the decoderis (Mv{circumflex over (x)}, Mvŷ), the error distance (ED) is computedasED=√{square root over ((Mvx-Mv{circumflex over (x)})²+(Mvy-Mvŷ)²)}.  (6)Error concealment technique of the present invention aims to find avector with the minimum ED at the decoder and then to obtain betterresults.

First, compute the temporal distance among the available neighboringblocks of the current and reference frames. The relative neighboringblocks of the lost block is as shown in FIG. 1, where B_(T), B_(B),B_(TL), B_(TR), B_(BL) and B_(BR) denote the top, the bottom, thetop-left, the top-right, the bottom-left, and the bottom-right blocks,respectively. Since the motion vectors of neighboring blocks areavailable, the temporal distance (TD) of the top blocks is firstestimated asTD _(T)=√{square root over ((Mvx _(t) ^(B) ^(T) -Mvx _(t-1) ^(B) ^(T))²+(Mvy _(t) ^(B) ^(T) -Mvy _(t-1) ^(B) ^(T) )²)},  (7)where Mvx_(t) ^(B) ^(T) and Mvx_(t-1) ^(B) ^(T) denotes the motionvector of the current and previous frame at the top block. By the sameway, the temporal distance of the bottom, the top-left, the top-right,the bottom-left, and the bottom-right blocks that are named as TD_(B),TD_(TL), TD_(TR), TD_(BL) and TD_(BR), respectively, can also be found.If the temporal distance of neighboring blocks is smaller, this impliesthat the linear motion or zero motion exists between the current blockand the previous block. The linear motion means that the current blockand the previous block have the same motion vector. In order to makesure the linear motion exist, the multi-direction approach is used tocheck the temporal distance. The local temporal distances (LTD) of theleft side and the right side for the lost block are computed byLTD _(Left)=Σ(TD _(TL) ,TD _(T) ,TD _(BL) ,TD _(B)),LTD _(right)=Σ(TD _(T) ,TD _(TR) ,TD _(BR) ,TD _(B)).  (8)Since the linear motion may occur in other directions, the localtemporal distances for the right-bottom and the left-bottom denotedLTD_(right-bottom) and LTD_(left-bottom) are calculated by parameters(TD_(TR),TD_(BR),TD_(B),TD_(BL)) and (TD_(TL),TD_(BR),TD_(B),TD_(BL)),respectively. Similarly, the local temporal distances for the top-leftLTD_(top-left) and the top-right LTD_(top-right) corners areindividually computed by using (TD_(TL),TD_(T),TD_(TR),TD_(BL)) and(TD_(BR),TD_(TL),TD_(T),TD_(TR),). Afterwards, the local temporaldistance for the lost block is estimated by the minimum value of(LTD_(left), LTD_(right), LTD_(right-bottom), LTD_(left-bottom),LTD_(top-left), LTD_(top-right)). If the estimated LTD value is lessthan one threshold, the linear motion or zero motion is confirmed. Themotion vector of previous frame MVx_(t-1) ^(C) can be used forcalculating the motion vector of the current lost block. If theestimated LTD value is greater than the threshold, this implies thatthere are large motion deviations between the current and previousframes at the lost block local area, and therefore, the temporal vectorcannot be used.

If the LTD value is greater than the threshold, the motion vector fromneighboring blocks of the current frame is estimated for the lost block.The vector distance (VD) of left side is computed by $\begin{matrix}{{VD}_{left} = \sqrt{\left( {{Mv}_{t}^{B_{TL}} - {Mv}_{t}^{B_{T}}} \right)^{2} + \left( {{Mv}_{t}^{B_{T}} - {Mv}_{t}^{B_{B}}} \right)^{2} + \left( {{Mv}_{t}^{B_{B}} - {Mv}_{t}^{B_{BL}}} \right)^{2} + \left( {{Mv}_{t}^{B_{BL}} - {Mv}_{t}^{B_{TL}}} \right)^{2}}} & (9)\end{matrix}$Similarly, we can compute parameters VD_(right) by using the vectors ofthe top, the top-right, the bottom-right and the bottom blocks. Thevector distances VD_(right-bottom), VD_(left-bottom), VD_(top-left),VD_(top-right) and VD_(right) are computed for the other directions tofind a possible motion direction with the current frame information. Thelocal vector distance (LVD) for the lost block is estimated byLVD=Min. (VD _(left) ,VD _(right) ,VD _(right-bottom) ,VD _(left-bottom),VD _(top-left) ,VD _(top-right))  (10)If the LVD is less than a threshold, this implies that the local areahas the same motion vector. The motion vector for the lost block isattained from the average of four vectors with the minimum distance. Forexample, if the VD_(left) has the minimum distance, the motion vectorfor the lost block is estimated from $\begin{matrix}{{{MV}\left( {\hat{x},\hat{y}} \right)} = {\left( {\frac{{Mvx}_{t}^{B_{TL}} + {{Mvx}_{t}^{B_{T}}{Mvx}_{t}^{B_{B}}} + {Mvx}_{t}^{B_{TL}}}{4},\frac{{Mvy}_{t}^{B_{TL}} + {Mvy}_{t}^{B_{T}} + {Mvy}_{t}^{B_{B}} + {Mvy}_{t}^{B_{TL}}}{4}} \right).}} & (11)\end{matrix}$This is one of the methods to obtain the motion vector for the lostblock in the present invention.

However, if the local temporal distance and the local vector distanceare all larger than thresholds, the motion vector of the lost blockcannot be estimated in accuracy since the correlation of the neighboringblocks in the current and previous frames is very low. Thus, the averagevector of the current and previous frames is used from $\begin{matrix}{{{{MV}\left( {\hat{x},\hat{y}} \right)} = \left( \frac{{Mv}_{t}^{B_{TL}} + {Mv}_{t}^{B_{T}} + {Mv}_{t}^{B_{TR}} + {Mv}_{t}^{B_{BR}} + {Mv}_{t}^{B_{B}} + {Mv}_{t}^{B_{BL}} + {2{Mv}_{t - 1}^{B_{C}}}}{8} \right)},} & (12)\end{matrix}$to achieve an averaged result.

The error concealment of the intra-frame (I-frame), P-frame and B-framewill be described in the following with reference to FIG. 3 illustratingthe processing flow of the full system.

For intra-frame coding, all blocks are coded with DCT (Discrete CosineTransform) and VLC techniques to remove spatial redundancy. In practicalvideos, one program consists of many various sequences, and the scenechange may occur at any frame. As for the error concealment of theI-frame, whether the scene changes or not at the I-frame is first check.If the previous and current GOPs belong to the same video sequence, theP-frame of the previous GOP is applied to recover the I-frame error ofthe current GOP. The relative motion prediction for error concealment isillustrated in FIG. 4. If the scene just changes at the I-frame, theerror concealment employs the spatial processing, such as theaforementioned spatial interpolation or bilinear interpolation, sincethe previous and current GOPs lack of correlation.

Based on this concept, whether the scene changes is first check from$\begin{matrix}{{MDiff} = {\frac{\sum\limits_{i = 0}^{N - 1}\left( \quad{\sum\limits_{j = 0}^{15}\quad{\sum\limits_{k = 0}^{15}\quad{{P_{ijk}^{{prev} - {GOP}} - I_{ijk}^{{Cur} - {GOP}}}}}} \right)}{N}.}} & (13)\end{matrix}$The matching difference (MDiff) between the last P frame of the previousGOP (P_(ijk) ^(pre-GOP)) and the current I-frame (I_(ijk) ^(Cur-GOP)) iscomputed with the N blocks of the first Slice (if the first slice isdamaged, the next ones are checked). If the MDiff is over than adetection-threshold, it implies that the scene changes at the I-frame.In such a case, the spatial interpolation or bilinear interpolation isemployed to recover the lost pixels. Otherwise, the spatial processingand the temporal compensation are adaptively computed based on temporalcorrelation and spatial variance. If the temporal correlation is high,one can increase the weighting of temporal compensation and decrease theweighting of spatial processing. Due to temporal compensation, highperformance can be obtained for still blocks or low-motion blocks insuch a case. However, if the temporal correlation is low, it impliesthat there are large deviations between the current and referencedframes. Accordingly, the weighting of temporal data should be greatlyreduced to avoid non-matching errors, especially for high motion areas.On the other hand, the parameter of spatial variance is adopted. If thespatial variance is high, the spatial processing cannot achieve goodquality for high-frequency blocks, thus the weighting of temporal resultcan be adaptively increased.

As for temporal compensation, an efficient method is presented to findthe motion vector from the P-frame of the previous GOP to recoverI-frame. If I-frame concealment motion vectors are not transmitted, themotion vector for the lost block needs to be found. The motion vector ofI-frame can be computed by using median function from the vectors ofneighboring blocks in the last P-frame of the previous GOP, which can beexpressed as{overscore (MV)} _(t) ^(C) =Med.(MV _(t-1) ^(C) ,MV _(t-1) ^(T) ,MV_(t-1) ^(TL) ,MV _(t-1) ^(B) ,MV _(t-1) ^(BR) ,MV _(t-1) ^(BL))  (14)where {overscore (MV)}_(t) ^(C) denotes the motion vector of the lostblock, and MV_(t-1) ^(C),MV_(t-1) ^(T),MV_(t-1) ^(TL),MV_(t-1)^(TR),MV_(t-1) ^(B),MV_(t-1) ^(BL), and MV_(t-1) ^(BR) denote the motionvectors of the current, the top, the top-left, the top-right, thebottom, the bottom-left and the bottom-right blocks in the previous Pframe. The relative neighboring blocks of the lost block is as shown inFIG. 1, where B_(T), B_(B), B_(TL), B_(TR), B_(BL) and B_(BR) denote thetop, the bottom, the top-left, the top-right, the bottom-left, and thebottom-right blocks, respectively. This is the other method to obtainthe motion vector for the lost block in the present invention.

The adaptive weighting function can be computed with two parameters. Oneis the spatial feature with DCT coefficients of the neighboring blocksin the current I frame. The other is the motion feature from the motionvector of the previous P frame. Assumed that the DCT coefficients of theneighboring blocks are available, these coefficients can be employed toanalyze the frequency distribution. FIG. 5 shows the frequencydistribution in a DCT block. The first row coefficients at the V1 regionrepresents the vertical edges, while the first column coefficients atthe H1 region represents the horizontal edges. The region D45 componentsimply diagonal edges with 45 degree, while the region D135 componentsimply diagonal edges with 135 degree. If the corrupted Slice containshorizontal edges, the spatial processing is hardly to recover thehorizontal edge from the adjacent Slices. Hence, the adaptive functionadopts the horizontal parameter of neighboring blocks. To enhance thehorizontal factor, the amplitude of horizontal components (AH) isestimated from the decoded DCT coefficients of N×N block size with$\begin{matrix}{{AH}_{lost} = {{C1} \times \left( {{\sum\limits_{u = 1}^{N - 1}\quad{{\hat{F}}_{u0}^{T}}} + {{\hat{F}}_{u0}^{B}}} \right)}} & (15)\end{matrix}$where C1 is a constant. {circumflex over (F)}_(u0) ^(T) and {circumflexover (F)}_(u0) ^(B) are the horizontal components of the de-quantizedDCT coefficients in the top and bottom blocks respectively, and theindex (u,0) denotes the location of the horizontal-edge coefficients inFIG. 5.

Besides, if the block variance is high, the performance also becomespoor since the high-frequency content is not easily to recover with thespatial processing. The block variance can be easily computed withsummation of all non-zero AC coefficients in DCT domain, which can beexpressed by $\begin{matrix}{{BV} = {\sum\limits_{i = 1}^{M - 1}\quad{{AC}_{i}}}} & (16)\end{matrix}$where AC_(i) is the non-zero AC coefficient that can be obtained fromrun-length code, and M is the number of non-zero AC coefficients. Theneighboring blocks are available to estimate the block-variance (BV)parameter of the lost block, which is given byBV _(lost) =C2×(BV _(TL) +BV _(TR) +BV _(BL) +BV _(BR)+2(BV _(T) +BV_(B)))  (17)where BV_(TL), BV_(TR), BV_(BL), BV_(BR), BV_(T) and BV_(B) denote theblock variance in the adjacent top-left, top-right, bottom-left,bottom-right, top and bottom blocks. The weighting of top and bottomblocks is double since their features are closer to the processed block.Then, the parameter of spatial information (SI) can be achieved fromSI _(lost) =AH _(lost) +BV _(lost)   (18)Let AH_(lost) and BV_(lost) limit in 0˜0.4 and 0˜0.6 by adjusting C1 andC2, respectively, to set SI_(lost) value in the range of 0˜1 ( ifSI_(lost) is over 1, it is set to 1). The constants C1 and C2 aredecided from practical experiments to achieve the best image quality.

Moreover, the temporal parameter is estimated from the previous P-framemotion vector. While the motion speed is high, the prediction errorbecomes high due to non-matching errors. The motion parameter (MP) forthe lost block of I-frame can be computed from the neighboring blocks ofthe previous P-frame asMP _(lost) =C3×(|MV _(B) ^(P) |+|MV _(T) ^(P) |+|MV _(TR) ^(P) |+|MV_(BT) ^(P) |+|MV _(BR) ^(P)|)  (19)where MV_(n) ^(P) denotes the motion vector of previous P-frame at then^(th) block. The MP_(lost) value is also limited in 0˜1 by adjustingthe constant C3.

Based on the spatial information and motion parameter, the adaptivefunction can be devised to improve the performance for errorconcealment. Since the video features are widely various, the weightingcoefficients are computed for different images processing. As theprocessed block has high spatial variance or horizontal edge, theweighting of the temporal compensation is increased to improve the imageresolution since the spatial processing cannot achieve good performancein this case. However, the weighting of spatial processing is increasedin high-motion blocks to reduce the non-matching errors from thetemporal compensation. The pixel value is adaptively computed with thespatial processing and the temporal compensation according to theestimated weighting coefficient, which can be given by{circumflex over (f)} _(ij)=(1−(SI _(lost) -MP _(lost)))×{circumflexover (f)} _(ij)(S)+(SI _(lost)-MP _(lost))×{circumflex over (f)}_(ij)(T)  (20)where {circumflex over (f)}_(ij)(T) and {circumflex over (f)}_(ij)(S)are the interpolated results from the temporal compensation and thespatial processing, respectively. The weighting coefficient(SI_(lost)-MP_(lost)) is called as Coeff_I limited in the range of 1˜0.As a low motion block (or still block) with high spatial variance, theMP_(lost) value is small and SI_(lost) becomes large. In this case, theweighting of {circumflex over (f)}_(ij)(T) is increased to improve theperformance. When the motion distance becomes higher, the weighting of{circumflex over (f)}_(ij)(T) and {circumflex over (f)}_(if)(S) areadaptively computed according to the spatial information and the motionparameter. In very high motion blocks, MP_(lost) values would be higher,and then, the weighting of {circumflex over (f)}_(ij)(T) is greatlyreduced to reduce non-matching errors.

For P-frames error concealment, three P-pictures are needed to processin the current GOP. The motion vector of the first P-frame, denoted asP1, is computed from the motion vectors of neighboring blocks since itsreference is I-frame that cannot provide motion parameters. The medianfunction is presented to find the lost motion vector from neighboringavailable vectors as{overscore (MV)} _(t) ^(C) =Med.(MV _(t) ^(A) ,MV _(t) ^(T) ,MV _(t)^(TR) ,MV _(t) ^(TL) ,MV _(t) ^(B) ,MV _(t) ^(BR) ,MV _(t) ^(BL))  (21)where {overscore (MV)}_(t) ^(C) denotes the motion vector of the lostblock, MV_(t) ^(A)=(MV_(t) ^(T)+MV_(t) ^(B))/2 is an average vector ofthe top and bottom blocks, and MV_(t) ^(T),MV_(t) ^(TR),MV_(t)^(B),MV_(t) ^(BR) and MV_(t) ^(BL) denote the motion vectors of the top,the top-right, the top-left, the bottom, the bottom-right and thebottom-left blocks in the current P frame.

As recovery for the second and the third P-frames, denoted as P2 and P3,first compute the temporal motion distance among the availableneighboring blocks of the current and reference frames. The medianfunction is taken by{overscore (MV)} _(t) ^(C) =Med.(MV _(t-1) ^(C) ,MV _(t) ^(T) ,MV _(t)^(TR) ,MV _(t) ^(TL) ,MV _(t) ^(B) ,MV _(t) ^(BR) ,MV _(t) ^(BL))  (22)where {overscore (MV)}_(t) ^(C) denotes the motion vector of the lostblock, MV_(t-1) ^(C) is the motion vector of the current block in thesame position of the previous P-frame, and MV_(t) ^(T), MV_(t) ^(TR),MV_(t) ^(TL), MV_(t) ^(B), MV_(t) ^(BR), MV_(t) ^(BL) denote the motionvectors of the top, the top-right, the top-left, the bottom, thebottom-right and the bottom-left blocks in the current P frame. However,if a large area of the P frame is corrupted, then, the use of the medianmotion vector of the current frame is no longer valid. In this case, themotion vector from the previous frame can be used. The scheme is similarto the proposed method for the I-frame concealment.

For P-framne error concealment, an adaptive function is also used tomodify the weighting of the temporal and spatial results. In MPEGinter-coding scheme, the difference of inter-blocks is coded with DCT.The amount of the residual DCT coefficients implies the difference ofthe current coded block and the matched block. Clearly, the residual DCTcoefficients of neighboring available blocks are useful to estimate theparameter of the frame correlation. The block deviation (BD) is computedfrom the quantized DCT coefficients with $\begin{matrix}{{BD} = {\sum\limits_{u = 0}^{N - 1}\quad{\sum\limits_{u = 0}^{N - 1}\quad{{\overset{\sim}{F}}_{uv}}}}} & (23)\end{matrix}$The BD value represents the block correlation. Then, the BD parameterfor a lost block can be estimated from the DCT coefficients ofneighboring blocks byBD _(lost) =C4×(BD _(TL) +BD _(TR) +BD _(BL) +BD _(BR)+2(BD _(T) +BD_(B))),1≧BD _(lost)≧0,  (24)where C4 is a normalized constant to limit BD_(lost) in the range of 1to 0. BD_(n) implies the block deviation for the n^(th) block. Then, theadaptive function can be determined by{circumflex over (f)} _(ij)=(1−BD _(lost))×{circumflex over (f)}_(ij)(T)+BD _(lost) ×{circumflex over (f)} _(ij)(S).  (25)where BD_(lost) is called as coeff_P. If the BD_(lost) level is small,the recovery pixels almost come from the motion compensation since thecorrelation of inter-blocks is high. However, while the current andprevious blocks have large differences, the temporal correlation wouldbecome low and the estimated BD_(lost) value would become largeaccordingly. The equation (25) can adaptively increase the weighting ofspatial processing to reduce the matching errors.

In additional, the error concealment algorithm also can solve theproblem of scene change. If the scene just changes at the P-frame, thecurrent block and the reference block will have large deviations. Theestimated BD level would be very high due to no correlations betweeninter-frames. The adaptive function from equation (25) can automaticallyreduce the temporal weighting to zero. Therefore, the result comes fromthe spatial processing in this case. Although the spatial processingblurs image edges, it can avoid non-matching errors. The same way isused for B-frames processing. The block deviation is computed withequation (23) from the previous reference frame and the next referenceframe, respectively. The previous or the next frame as the referenceframe is selected from a smaller block deviation for the B-frame errorconcealment. Then, the processing flow of B-frames is the same asP-frame with equation (23) to equation (25).

FIG. 6 illustrates the apparatus for error concealment of the preferredembodiment of the present invention. The apparatus receives an inputsignal from the error flag and Slice start code to identify whichmacro-block is error and the frame type in the control core. Then, DCTcoefficients are extracted from the video decoder and these parametersare computed in the parameter computation module to derive at least acoefficient for the weighting in an adaptive processing. The neighboringmotion vectors are read from a frame memory to compute the motionvectors of the processed block for PB-frame and I-frame, respectively,in the temporal compensation module. Then, a result of the temporalcompensation is obtained. The result can be derived from equation (11)by the minimum vector distance, or from equation (14) and equation (21)by median function. Meanwhile, for spatial processing, spatial data,such as the boundary pixel, is read from another frame memory and isstored to the on-chip line buffer for real-time implementation. Thespatial processing module computes spatial data to obtain a result ofthe spatial processing. The result can be derived from aforementionedspatial interpolation or by bilinear interpolation. With the coefficientfor the weighting and the results of the spatial processing and thetemporal compensation, the adaptive processing module proceeds theadaptive computation in accordance with the equation (20) for I-frameand equation (25) for PB-frames, respectively, and acquires onecorrected pixel. Afterwards, a multiplexer outputs the corrected pixelin the error macro-block per cycle.

FIG. 7 illustrates the computation schedule of the spatial processing.In the video coding system, the minimum synchronization point uses GOBor Slice that is a set of macro blocks (MB). If any macro block iscorrupted in the current Slice, the next decoding macro blocks in thesame Slice will all be error. As shown in FIG. 7, the errors occurred atthe 47th MB and this error Slice ends at 88th MB. Then, the next Sliceis decoded in normal. The computation schedule of the spatial processingfor the 47th MB is in decoding the 92th MB since the 91th MB pixel datais needed. As decoding the 93th MB, the 47th MB can be sent withpixel-by-pixel after error concealment by taking adaptive computation ofthe spatial processing and the temporal compensation. For the purpose oferror concealment, the current decoding Slice must be buffered in thetemporal memory. This error concealment Slice will be output whendecoding the next Slice. From FIG. 7, the system output delays one Sliceand two macro-blocks. Therefore, the error concealment chip requireslarge memory to buffer the decoding blocks.

FIG. 8 illustrates the implementation of the present invention in anerror concealment chip. The system architecture comprises a videodecoder, and the error concealment chip. The frame type is determinedfrom head processing while the video stream is decoded. Moreover, theposition of the error block also can be found according to the decodedparameters of the mba (Macro-block Address), cbp(Code Block Pattern) andstart code. These decoded signals are sent to the control core in orderto control each computational module. The DCT coefficients are extractedfrom the decoder to decide the block deviation for PB frames and theblock variance and spatial information for I-frame. The coefficients forthe weighting in an adaptive computation for the I-frame or PB-framesare derived. The decoding motion vectors of the previous frame and thecurrent frame are stored on the temporal memory off-chip. The vector isread to the on-chip buffer and then to derive the result of the temporalcompensation for PB-frames or I-frame. Meanwhile, the chip reads theframe memory to line-buffer for spatial processing. For real-timeimplementation, the last row of the top block is stored at H-linebuffers (H is the horizontal sampling number), where the line buffer isrealized with embedded memory. If 4CIF format is used, 704×8 memorycells are required for an 8-bit pixel. The first row of the currentdecoding block is stored on the temporal buffers with 16×8 registersfrom IDCT results. One spatial pixel is interpolated per cycle and then,it is latched at 16×16 registers on-chip. As the time schedule goes tothe next block, the error pixel is corrected by taking the adaptivecomputations with the coefficients for the weighting, the result of thespatial processing and the result of the temporal compensation from theframe memory. The output of this chip is from a multiplexer.Furthermore, the error flag is detected whether it is high. If the errorflag is low, it implies there are no errors for the decoding data, andthen, the frame memory is directly read. Otherwise, the corrected pixelfrom the adaptive processing is sent to the output as the error flag isfound. Moreover, if the position of the error macro-block is located atthe boundary or two continuous error Slices (or GOBs) are found, thechip uses the temporal compensation from frame memory via the previousvector instead of the adaptive processing, since the spatial processingquality becomes poor in such two cases.

Please refer to FIG. 7 and FIG. 8. When the decoding timing schedule ofthe computational kernel runs to the 91th MB, the parameters of AH, BVand BD from DCT coefficients for 47^(th) MB recovery are computed. Sinceone MB consists of four 8×8-blocks for Y signal, the DCT coefficientsfrom four blocks are accumulated to compute these parameters. Forreal-time operation, all computations for one MB must be finished during256 clocks since the size of the MB is 16×16. To achieve this purpose,pipeline schedule is employed to solve the timing constrain. Since theline-buffer designed with embedded memory has more limitations for dataaccess, the partial data is preloaded to the on-chip registers. As thedecoding time runs to the 92th MB, the last row of the 3th MB and thefirst row of the 91th MB have been stored at the 32×8 line-buffer and16×8 line-buffer, respectively. The spatial pixel is computed withaforementioned spatial interpolation or bilinear interpolation for the47^(th) MB, and the results are latched at the on-chip memory. Sinceeach MB has 256 pixels, 256 clocks are spent to interpolate them.Meanwhile, the motion vector for the temporal compensation is estimatedin this period. For median vector searching, first 7 vectors are loadedto the register with 7 clocks. With simple looping search, the medianvector can be estimated with 21 clocks and its result is latched. Toprocess one macro block, 256 clocks are admitted. The temporalcompensation is not a critical path in the chip since it only uses 28clocks in total. According to this motion vector, the 16 pixels arepre-loaded from frame memory data to 16 registers on chip to reduce theaccess time. When decoding the 93th MB, available pixels for the 47th MBare output with the adaptive computation of the spatial pixels andtemporal compensation results. Thus, the chip can output one pixel percycle for real-time operation.

FIG. 9 illustrates the test structure of the preferred embodiment of thepresent invention. For testable measures, each computational path isneeded to isolate to verify the function for a physical testing sincethe system has multi-path processing flow. This test structure has twooutput ports. One is for the adaptive fumction and the other is for thespatial processing output. There are two purposes to plan the spatialprocessing output. One is that the user can select the spatialprocessing output when the decoder operates in frame skipping mode forfast forward/backward searching since the temporal correlation is verylow. The other is that for testable measures, the computational core andline buffer can be verified from the spatial processing output. If theresult of the adaptive computation does not meet the expectation, thecomputational path in which error occurs will be found. Zeros can beinput to the spatial processing module from IDCT result port, and theframe type of P is decided to verify the computational path coeff_P andits adaptive function with equation (25) from the output. SI_(lost),coeff_I and adaptive function computational core can also be verified asthe frame type used I and the input motion vector used zeros. In thesame way, the MP_(lost) computational core can be verified using zeroDCT coefficients as input. With these approaches, one can find which onecomputational circuit is error for the prototyped chip testing.

As is understood by a person skilled in the art, the foregoing preferredembodiments of the present invention are illustrative of the presentinvention rather than limiting of the present invention. It is intendedthat various modifications and similar arrangements are covered withinthe spirit and scope of the appended claims, the scope of which shouldbe accorded the broadest interpretation so as to encompass all suchmodifications and similar structures.

1. An apparatus for error concealment, the apparatus comprising: acontrol core, receiving an input signal and identifying an errormacro-block in a column of slice of a frame and a frame type of theframe; a parameter computation module, electrically connecting to thecontrol core, the parameter computation module receiving a plurality ofDCT coefficients and temporal data to derive at least a coefficient forthe weighting in an adaptive computation for the frame; a temporalcompensation module, electrically connecting to the control core, thetemporal compensation module computing the temporal data to obtain aresult of the temporal compensation; a spatial processing module,electrically connecting to the control core, the spatial processingmodule computing spatial data to obtain a result of the spatialprocessing; and an adaptive processing module, electrically connectingto the control core, the adaptive processing module proceeding theadaptive computation with the coefficient for the weighting derived bythe parameter computation module, the result of the temporalcompensation and the result of the spatial processing to obtain a resultof the adaptive processing.
 2. The apparatus for error concealment ofclaim 1, further comprising a multiplexer for outputting a normal pixel,or the result of the temporal compensation, the result of the spatialprocessing, or the result of the adaptive processing as a correctedpixel in the error macro-block.
 3. The apparatus for error concealmentof claim 2, wherein the multiplexer determines the outputting of thenormal pixel or the corrected pixel in the error macro-block accordingto an error flag signal, the value of matching difference, and theposition of the error macro-block.
 4. The apparatus for errorconcealment of claim 1, further comprising at least a line buffer tostore the spatial data.
 5. The apparatus for error concealment of claim1, further comprising at least a register to store the temporal data. 6.A method for error concealment, the method comprising: receiving aninput signal and identifying an error macro-block in a column of sliceof a frame and a frame type of the frame; extracting a plurality of DCTcoefficients from a decoder and accessing temporal data to derive atleast a coefficient for the weighting in an adaptive computation for theframe; computing the temporal data to obtain a result of the temporalcompensation, and computing spatial data to obtain a result of thespatial processing; and proceeding the adaptive computation with thecoefficient for the weighting, the result of the temporal compensationand the result of the spatial processing, and generating a result of theadaptive processing.
 7. The method for error concealment of claim 6,further comprising outputting a normal pixel, or the result of thetemporal compensation, the result of the spatial processing, or theresult of the adaptive processing as a corrected pixel in the errormacro-block.
 8. The method for error concealment of claim 7, wherein thenormal pixel is output if an error flag signal is detected low.
 9. Themethod for error concealment of claim 7, wherein the result of thetemporal compensation is output as the corrected pixel in the errormacro-block if the error macro-block is located at the boundary or aplurality of errors occur in continuous slices.
 10. The method for errorconcealment of claim 7, wherein the result of the spatial processing isoutput as the corrected pixel in the error macro-block if the value ofmatching difference is greater than a threshold.
 11. The method forerror concealment of claim 6, further comprising inputting a pluralityof macro-blocks of a next column of slice when the error macro-block iscomputed.
 12. The method for error concealment of claim 11, wherein theframe is an I-frame, and the step of proceeding the adaptive computationis in accordance with the equation: {circumflex over(f)}_(ij)=(1−(SI_(lost)-MP_(lost)))×{circumflex over(f)}_(ij)(S)+(SI_(lost)-MP_(lost))×{circumflex over (f)}_(ij)(T), where{circumflex over (f)}_(ij)(T) and {circumflex over (f)}_(ij)(S) are theresult of the temporal compensation and the result of the spatialprocessing, respectively, and the weighting coefficient(SI_(lost)-MP_(lost)) is the coefficient derived after the step ofextracting the DCT coefficients and accessing temporal data.
 13. Themethod for error concealment of claim 12, wherein the SI_(lost) in theweighting coefficient is the parameter of spatial information of theerror macro-block derived from the amplitude of horizontal components(AH_(lost)) and the block variance (BV_(lost)) of the error macro-blockby the equation: SI_(lost)=AH_(lost)+BV_(lost), and the MP_(lost) in theweighting coefficient is the parameter of motion parameter of the errormacro-block derived from neighboring blocks of a previous P-frame by theequation: MP_(lost)=C1×(|MV_(B) ^(P)|+|MV_(T) ^(P)|+|MV_(TR)^(P)|+|MV_(BT) ^(P)|+|MV_(BR) ^(P)|), where C1 is a constant, and MV_(n)^(P) denotes the motion vector of the previous P-frame at the n^(th)block.
 14. The method for error concealment of claim 13, wherein theamplitude of horizontal components of the error macro-block (AH_(lost))is estimated from the DCT coefficients with the equation:${{AH}_{lost} = {{C2} \times \left( {{\sum\limits_{u = 1}^{N - 1}\quad{{\hat{F}}_{u0}^{T}}} + {{\hat{F}}_{u0}^{B}}} \right)}},$where C2 is a constant, and {circumflex over (F)}_(u0) ^(T) and{circumflex over (F)}_(u0) ^(B) are horizontal components of the DCTcoefficients in the top and bottom blocks of the error macro-block, andthe block variance of the error macro-block (BV_(lost))is computed fromneighboring blocks of the error macro-block by the equation:BV_(lost)=C3×(BV_(TL)+BV_(TR)+BV_(BL)+BV_(BR)+2(BV_(T)+BV_(B))), whereC3 is a constant, and BV_(TL), BV_(TR), BV_(BL), BV_(BR), BV_(T) andBV_(B) denote the block variance of the top-left, the top-right, thebottom-left, the bottom-right, the top and the bottom blocks of theerror macro-block.
 15. The method for error concealment of claim 14,wherein the DCT coefficients comprises the block variance computed withsummation of all non-zero AC coefficients in DCT domain by the equation:${{BV} = {\sum\limits_{i = 1}^{M - 1}\quad{{A\quad C_{i}}}}},$ whereAC_(i) is the non-zero AC coefficient that can be obtained fromrun-length code, and M is the number of non-zero AC coefficients. 16.The method for error concealment of claim 11, wherein the frame is aP-frame or a B-frame, and the step of proceeding the adaptivecomputation is in accordance with the equation: {circumflex over(f)}_(ij)=(1−BD_(lost))×{circumflex over(f)}_(ij)(T)+BD_(lost)×{circumflex over (f)}_(ij)(S), where {circumflexover (f)}_(ij)(T) and {circumflex over (f)}_(ij)(S) are the result ofthe temporal compensation and the result of the spatial processing,respectively, and the weighting coefficient BD_(lost) is the coefficientderived after the step of extracting the DCT coefficients.
 17. Themethod for error concealment of claim 16, wherein the weightingcoefficient BD_(lost) is the block deviation of the error macro-blockestimated from the DCT coefficients of neighboring blocks by theequation:BD_(lost)=C4×(BD_(TL)+BD_(TR)+BD_(BL)+BD_(BR)+2(BD_(T)+BD_(B))),1≧BD_(lost)≧0,where C4 is a constant, and the block deviation (BD) is computed fromthe DCT coefficients with the equation:${BD} = {\sum\limits_{u = 0}^{N - 1}\quad{\sum\limits_{u = 0}^{N - 1}\quad{{{\overset{\sim}{F}}_{uv}}.}}}$18. The method for error concealment of claim 11, wherein the frame isan I-frame, and the result of the temporal compensation is obtained by amedian function from the equation: {overscore (MV)}_(t)^(C)=Med.(MV_(t-1) ^(C),MV_(t-1) ^(T),MV_(t-1) ^(TL),MV_(t-1)^(B),MV_(t-1) ^(BR),MV_(t-1) ^(BL)), where {overscore (MV)}_(t) ^(C)denotes the motion vector of the error macro-block, and MV_(t-1)^(C),MV_(t-1) ^(T),MV_(t-1) ^(TL),MV_(t-1) ^(TR),MV_(t-1) ^(B),MV_(t-1)^(BL), and MV_(t-1) ^(BR) denote the motion vectors of the current, thetop, the top-left, the top-right, the bottom, the bottom-left and thebottom-right blocks of the error macro-block in a previous P frame. 19.The method for error concealment of claim 11, wherein the frame is anI-frame, and the result of the temporal compensation is obtained from arule according to a temporal distance and a local vector distance, therule comprising: if the temporal distance is less than a firstthreshold, motion vector for lost block is attained from the motionvector of previous frame in the same locations; and if the temporaldistance is larger than the first threshold and the local vectordistance is less than a second threshold, the motion vector is obtainedfrom the average of the local vector distance.
 20. The method for errorconcealment of claim 19, wherein the rule further comprising: if thetemporal distance is larger than the first threshold and the localvector distance is larger than the second threshold, the motion vectoris obtained from the average vector of current and the previous framewith referring to the equation:${{{MV}\left( {\hat{x},\hat{y}} \right)} = \left( \frac{{Mv}_{t}^{B_{TL}} + {Mv}_{t}^{B_{T}} + {Mv}_{t}^{B_{TR}} + {Mv}_{t}^{B_{BR}} + {Mv}_{t}^{B_{B}} + {Mv}_{t}^{B_{BL}} + {2{Mv}_{t - 1}^{B_{C}}}}{8} \right)},$where MV({circumflex over (x)}, ŷ) denotes the motion vector of theerror macro-block, and Mv_(t) ^(B) ^(TL) ,Mv_(t) ^(B) ^(T) ,Mv_(t) ^(B)^(TR) ,Mv_(t) ^(B) ^(BR) ,Mv_(t) ^(B) ^(B) , and Mv_(t) ^(B) ^(BL)denote the motion vectors of the top-left, the top, the top-right, thebottom-right, the bottom and the bottom-left blocks of the errormacro-block in the current frame, and Mv_(t-1) ^(B) ^(C) denotes themotion vector of the current block in a previous frame.
 21. The methodfor error concealment of claim 11, wherein the frame is a P-frame or aB-frame, and the result of the temporal compensation is obtained fromneighboring available vectors by a median function from the equation:{overscore (MV)}_(t) ^(C)=Med.(MV_(t) ^(A),MV_(t) ^(T),MV_(t)^(TR),MV_(t) ^(TL),MV_(t) ^(B),MV_(t) ^(BR),MV_(t) ^(BL)), where{overscore (MV)}_(t) ^(C) denotes the motion vector of the errormacro-block, MV_(t) ^(A)=(MV_(t) ^(T)+MV_(t) ^(B))/2 is an averagevector of the top and bottom blocks of the error macro-block, and MV_(t)^(T),MV_(t) ^(TR),MV_(t) ^(B),MV_(t) ^(BR) and MV_(t) ^(BL) denote themotion vectors of the top, the top-right, the top-left, the bottom, thebottom-right and the bottom-left blocks of the error macro-block in thecurrent P frame or B frame.
 22. The method for error concealment ofclaim 11, wherein the frame is a second P-frame or a third P-frame, andthe result of the temporal compensation is obtained by a median functionfrom the equation: {overscore (MV)}_(t) ^(C)=Med.(MV_(t-1) ^(C),MV_(t)^(T),MV_(t) ^(TR),MV_(t) ^(TL),MV_(t) ^(B),MV_(t) ^(BR),MV_(t) ^(BL)),where {overscore (MV)}_(t) ^(C) denotes the motion vector of the errormacro-block, MV_(t-1) ^(C) denotes the motion vector of the currentblock in the same position of the previous P frame, and MV_(t) ^(T),MV_(t) ^(TR), MV_(t) ^(TL), MV_(t) ^(B), MV_(t) ^(BR), MV_(t) ^(BL)denote the motion vectors of the top, the top-right, the top-left, thebottom, the bottom-right and the bottom-left blocks of the errormacro-block in the current P frame.
 23. The method for error concealmentof claim 11, wherein the spatial processing can be a bilinearinterpolation.
 24. The method for error concealment of claim 11, whereinthe spatial processing can be a spatial interpolation method comprising:using block boundary matching between the neighboring blocks of theerror macro-block to find the edge direction for the error macro-block,and getting a plurality of results of the mean absolute difference(MAD); finding a first best vector of a first best match (BMA) between abottom block B_(B) and a top-left block B_(TL), a top block B_(T), and atop-right block B_(TR) of the error macro-block by the minimum MADvalue; interpolating at least a first corrected pixel along thedirection of the first best vector with weighting linear interpolation;finding a second best vector of a second best match between the topblock B_(T) and the bottom block B_(B), a bottom-left block B_(BL), anda bottom-right block B_(BR) of the error macro-block by the minimum MADvalue; interpolating at least a second corrected pixel along thedirection of the second best vector with weighting linear interpolation;and merging the first corrected pixel and the second corrected pixel.25. The method for error concealment of claim 24, wherein the step ofusing block boundary matching is referring to the equation:${{{MAD}\left( {M\quad x} \right)} = {\sum\limits_{i = 0}^{N - 1}\quad{{f_{0,i}^{B_{B}} - f_{{N - 1},{i + {Mx}}}^{B_{TL},B_{T},B_{TR}}}}}},$where Mx is a search vector that is from −N to N if the block size isN×N.
 26. The method for error concealment of claim 24, wherein the stepof interpolating the first corrected pixel with weighting linearinterpolation is referring to the equation:${{\hat{f}}_{{m1},{n1}}^{1} = {{f_{{N - 1},i}^{B_{TL},B_{T},B_{TR}} \times \frac{d2}{M}} + {f_{0,k}^{B_{B}} \times \frac{d1}{M}}}},$where d1 and d2 are the distances between the interpolated pixel to thebest matching boundary and to the bottom block.
 27. The method for errorconcealment of claim 24, wherein the step of interpolating the secondcorrected pixel with weighting linear interpolation is referring to theequation:${{\hat{f}}_{{m2},{n2}}^{2} = {{f_{0,i}^{B_{BL},B_{B},B_{BR}} \times \frac{d1}{M}} + {f_{{N - 1},k}^{B_{T}} \times \frac{d2}{M}}}},$where d1 and d2 are the distances between the interpolated pixel to thebest matching boundary and to the top block.
 28. The method for errorconcealment of claim 24, wherein the step of merging the first correctedpixel and the second corrected pixel is referring to the equation:If  f_(m1, n1)^(l) ≠ 0  and  f_(m2, n2)² = 0, f̂_(m, n) = f_(m1, n1)¹Elseif  f_(m1, n1)^(l) = 0  and  f_(m2, n2)² ≠ 0, f̂_(m, n) = f_(m2, n2)²${{{{Elseif}\quad f_{{m1},{n1}}^{1}} \neq {0\quad{and}\quad f_{{m2},{n2}}^{2}} \neq 0},{{\hat{f}}_{m,n} = \frac{f_{{m1},{n1}}^{1} + f_{{m2},{n2}}^{2}}{2}}}\quad$29. The method for error concealment of claim 24, further comprising:using a median filter or an overlap boundary search for at least aresidual error pixel.
 30. The method for error concealment of claim 6,wherein the step of proceeding the adaptive computation is computedduring one clock and the result of the adaptive processing is latched toa register.
 31. The method for error concealment of claim 6, furthercomprising a testable measure method to find a fault path, the testablemeasure method comprising: verifying a spatial processing module and aline buffer from a spatial processing output; inputting zeros to thespatial processing module and making the frame type to be P frame toverify a computational path coeff_P and an adaptive computation functionfrom an adaptive computation output; inputting zeros to a computationalcore MP_(lost) and making the frame type to be I frame to verify acomputational core SI_(lost), a computational path coeff_I, and theadaptive computation function from the adaptive computation output; andinputting zeros to the computational core SI_(lost) and making the frametype to be I frame to verify the computational core MP_(lost), thecomputational path coeff_I, and the adaptive computation function fromthe adaptive computation output.